var climbStairs = function(n) {
    /*
       1  1
       2  2
       3  3
       4  5
       5  8
     */
    var result = [];
    result[1] = 1;
    result[2] = 2;
    for (let i = 3; i < 51; i++) {
        result[i] = result[i-1] + result[i-2];
    }
    return result[n];
};

console.log(climbStairs(48));
